package com.lzx.security.custom;

import com.lzx.security.entity.User;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

//自定义用户类
public class CustomUser extends org.springframework.security.core.userdetails.User {
    private User userVO;

    public CustomUser(User userVO, Collection<? extends GrantedAuthority> authorities) {
        super(userVO.getMobile(), userVO.getPassword(), authorities);
    }

    public User getUserVO() {
        return userVO;
    }

    public void setUserVO(User userVO) {
        this.userVO = userVO;
    }
}
